<!--
 * @Author: ljc
 * @Date: 2023-05-05 14:09:40
 * @LastEditors: g05047
 * @LastEditTime: 2023-05-10 09:19:45
 * @Description: 任务详情规则列表
-->

<template>
  <div style="height: 100%;">
    <rk-grid ref="taskDetileRuleRef"
      :data="props.ruleList"
      boxConfig
      :columns="tableColumns"
      :pagerConfig='false'>
    </rk-grid>
  </div>
</template>

<script setup>
import { EXPERT_SCORE_STATUS } from '@/enums/enums-expert.js'
import { COMMON_STOP_OPEN_ENUMS } from '@/enums/enums-common.js'

const props = defineProps({
  ruleList: { type: Array, default: [] }
})
const taskDetileRuleRef = ref(null)
const tableColumns = ref([
  {
    field: 'status', title: '启用状态', width: 120, align: 'center', slots: {
      default: ({ row }) => {
        return row.status ? COMMON_STOP_OPEN_ENUMS.options[row.status].label : ""
      }
    }
  },
  { field: 'entryLev1', title: '评审规则名称一级项目名称', width: 250, align: 'left', },
  { field: 'entryLev2', title: '评审规则名称二级项目名称', width: 250, align: 'left', },
  { field: 'reviewDesc', title: '评审内容', width: 250, align: 'left', },
  {
    field: 'scoreType', title: '评审类型', width: 250, align: 'center', slots: {
      default: ({ row }) => {

        return row.scoreType ? EXPERT_SCORE_STATUS.options[row.scoreType].label : ""
      }
    }
  },
  { field: 'reviewStandard', title: '评审标准', width: 120, align: 'center', },
  { field: 'remark', title: '备注', width: 250, align: 'left', },
])
</script>
<style lang="scss" scoped>
.mr-15px {
  margin-right: 15px;
  &:last-child {
    margin-right: 0;
  }
}
.w-200px {
  width: 200px;
}
</style>